#!/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7
# -*- coding: utf-8 -*- 例如，可添加# -*- coding: utf-8 -*-

from openpyxl import load_workbook

table_name = "audio_info"
wb2 = load_workbook('%s.xlsx' % (table_name))
ws=wb2.get_sheet_names()
for row in wb2:

    i = 11;
    for cell in row:
        # 更新声音表图片地址
        i = i + 1;
        updatesql = 'update %s set image_addr = "%s" where id = %s ;' % (table_name, "/data/img/AAC/AAC_008/2019/1/29/6ba70206dde1447b81bd8409e59ce094.jpg", cell[0].value)
        print(updatesql)

        # updateredis = 'hmset #hash:{audio.info:%s}:%s image_addr %s ' % (cell[1].value, cell[0].value, "/data/img/AAC/AAC_008/2019/1/29/6ba70206dde1447b81bd8409e59ce094.jpg")
        # print(updateredis)

print("over...")
